import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { LayoutComponent } from '../layout/layout.component';
import { SupplierComponent } from './supplier.component';

import { AuthGuard } from '../auth-guard';
import { AuthService } from '../scheme/auth.service';

const supplierRoutes: Routes = [
	{
		path: 'admin',
		component: LayoutComponent,
		canActivateChild: [AuthGuard],
		children: [
			{
				path: 'supplier',
				component: SupplierComponent
			}
		]

	}
];
export const supplierRoutingProviders: any[] = [
	AuthGuard,
	AuthService

]
export const supplierRouting: ModuleWithProviders = RouterModule.forChild(supplierRoutes);